<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s"  uri="/struts-tags" %>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
   	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
	<title>菜单管理</title>
    <link href="<%=request.getContextPath()%>/css/bootstrap.css" rel="stylesheet" type="text/css">
    <script src="<%=request.getContextPath()%>/js/jquery-2.0.3.min.js" type="text/javascript"></script>
    <script src="<%=request.getContextPath()%>/js/bootstrap.js" type="text/javascript"></script>  
    
        
    <link rel="stylesheet" href="<%=request.getContextPath()%>/css/bootstrapValidator.css"/>
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/bootstrapValidator.js"></script>

    <script type="text/javascript">
    
    $(document).ready(function() {
    	$('#defaultForm')
        .bootstrapValidator({
            message: 'This value is not valid',
            fields: {
                "t.name": {
                    validators: {
                        notEmpty: {
                            message: '名称不能为空'
                        },
                        regexp: {
                            regexp: /^[a-zA-Z0-9\u4e00-\u9fa5]{2,10}$/,
                            message: '名称由2-10个汉字、字母或数字组成'
                        }
                    }
                }
            }
        })
    });
    </script>
</head>
<body>
<div class="panel panel-primary">
  <div class="panel-heading">供应商管理</div>
  <div class="panel-body">
    
	  <form id="defaultForm" class="form-horizontal" action="supplier/Supplier_save.action?page=${page }" method="post">
	  
		 <div class="form-group">
		    <label for="t.rolename" class="col-sm-offset-3 col-sm-2 control-label">供应商名称：</label>
		    <div class="col-sm-2">
		        <input class="form-control" type="text" name="t.name" id="text" placeholder="请输入供应商名称" value="${t.name}">
		    </div>
		  </div>

		<%--  <div class="form-group">
		    <label for="t.rolenameen" class="col-sm-offset-3 col-sm-2 control-label">供应商描述：</label>
		    <div class="col-sm-2">
		        <input class="form-control" type="text" name="t.description" id="description" placeholder="请输入供应商描述" value="${t.description}">
		        <textarea class="form-control" rows=10 name="t.description" id="description" placeholder="请输入供应商描述">${t.description}</textarea>
		    </div>
		  </div> --%>
		  
	      <c:if test="${!empty method}" >
	          <input name="method" type="hidden" value="${method }">
			  <input type="hidden" name="t.id" value="${t.id}">
			  <input type="hidden" name="t.creationtime" value="${t.creationtime}">
			  <input type="hidden" name="t.creator" value="${t.creator}">
		  </c:if>
		 
		  <div class="form-group">
		    <div class="col-sm-offset-5 col-sm-7">
		      <button type="submit" class="btn btn-default">提交</button>
		      <button type="reset" class="btn btn-default">重置</button>
		    </div>
		  </div>
      </form>
    
  </div>
  
</div>

</body>
</html>
